//用来封装所有与组织架构相关的请求
import request from "@/utils/request"

//获取所有的组织架构
export function companyDepartmentApi() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}

//删除部门接口
export function delDepartmentApi(id) {
  return request({
    url: '/company/department/' + id,
    method: 'DELETE'
  })
}

//新增部门
export function addDepartmentApi(data){
  return request({
    url:'/company/department',
    method:'post',
    data
  })
}
//修改部门
export function updateDepartmentApi(data){
  return request({
    url:'/company/department/'+data.id,
    method:'PUT',
    data
  })
}
